package com.game.action;

import com.coment.message.DrawResult;
import com.game.logic.items.account.UserAccountService;
import com.xs.action.annotate.ActionController;
import com.xs.action.annotate.ActionMethod;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/// 5-背包操作
@RestController("/bagAction")
@ActionController(value = 5, name = "背包操作")
public class BagAction {
    @Resource
    private UserAccountService userAccountService;

    /// 5-1 打开卡包
    @PostMapping("/openCardPackage")
    @ActionMethod(value = 1, name = "打开卡包")
    public List<DrawResult> openCardPackage(Integer userInfoId, Integer num){
        return userAccountService.openCardPackage(userInfoId, num);
    }
}
